<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>Login</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <link href="https://fonts.googleapis.com/css?family=Lato:300,400,700&display=swap" rel="stylesheet">

    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">

    <link rel="stylesheet" th:href="@{/css/style.css}">
    <link rel="stylesheet" th:href="@{/css/google_and_github.css}">

</head>
<body>
<section class="ftco-section">
    <div class="container">
        <div class="row justify-content-center">
            <div class="col-md-6 text-center mb-0">
                <h2 class="heading-section">Security Demo</h2>
            </div>
        </div>

        <div class="row justify-content-center mt-4">
            <div class="col-md-7 col-lg-5">
                <div class="text-center">
                    <a th:href="@{/oauth2/authorization/github}" class="btn btn-dark btn-block github_login mb-2">
                        <img src="/images/github_white.svg" alt="GitHub Logo" width="20" height="20">
                        Login with GitHub
                    </a>
                    <a th:href="@{/oauth2/authorization/google}" class="btn btn-light btn-lg btn-block google_login mb-3">
                        <img src="/images/Google-G-logo.svg" width="20" height="20">
                        Login with Google
                    </a>
                </div>
            </div>
        </div>

        <div class="row justify-content-center">
            <div class="col-md-7 col-lg-5">
                <div class="login-wrap p-4 p-md-5">
                    <div class="icon d-flex align-items-center justify-content-center">
                        <span class="fa fa-user-o"></span>
                    </div>
                    <h3 class="text-center mb-4">Sign In</h3>
                    <div th:if="${param.error}">
                        Invalid username and password.
                    </div>
                    <form th:action="@{/login}" method="post">
                        <div class="form-group">
                            <input type="text" class="form-control rounded-left" name = "username" placeholder="Username" required>
                        </div>
                        <div class="form-group d-flex">
                            <input type="password" class="form-control rounded-left" name = "password" placeholder="Password" required>
                        </div>
                        <div class="form-group">
                            <button type="submit" class="form-control btn btn-primary rounded submit px-3">Login</button>
                        </div>
                        <div class="form-group d-md-flex">
                            <div class="w-50 text-md-left">
                                <a th:href="@{/user/create}">SignUp</a>
                            </div>
                            <div class="w-50 text-md-right">
                                <a href="#">Forgot Password</a>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</section>
<script th:src="@{/js/jquery.min.js}"></script>
<script th:src="@{/js/popper.js}"></script>
<script th:src="@{/js/bootstrap.min.js}"></script>
<script th:src="@{/js/main.js}"></script>

</body>
</html>

